1. Field of the Invention
The present invention relates to a device for controlling the rotational speed of a motor.
2. Description of the Prior Art
For example, in a control device of a servomotor for driving an optical system of a document reader such as an electrophotographic copying machine, even if the load on the motor fluctuates by the change in frictional resistance or the like as the optical system is moved, the optical system must be moved at constant speed by adjusting a motor control voltage with the fluctuations being rapidly followed to keep the speed of the servomotor constant.
Such proportional control has been conventionally carried out that a control signal is obtained by a voltage proportional to the difference between the command speed and the actually detected speed in order to keep the speed of a servomotor constant.
However, the conventional proportional control has the disadvantage in that the detected speed does not rapidly follow the command speed because it takes long for the speed to reach the command speed when the detected speed diviates from the command speed.
The applicant of the present application has developed a device capable of controlling a motor with the motor rapidly following the command speed by finding the difference between the command speed and the detected speed as well as finding the phase difference between a command speed signal and a detected speed signal and correcting a proportional control signal obtained by the difference in speed by a component of the phase difference, to apply for a patent (U.S. patent application Ser. No. 07/550,722).
In the above described device developed by the applicant of the present application, the phase difference is detected in, for example, the following manner.
More specifically, the leading edge of a speed command pulse is detected, and a time period T1 from a predetermined reference time point to the time when the leading edge of the pulse is detected is calculated and stored for each detection of the leading edge. On the other hand, the leading edge of a speed detection pulse is detected, and a time period T2 from the reference time point to the time when the leading edge of the pulse is detected is calculated and stored for each detection of the leading edge.
The difference between T1 and T2 stored at that time is calculated for each predetermined comparison timing, and the result of the calculation (T1-T2) is divided by the period of the speed command pulse to find the phase difference between the speed detection pulse and the speed command pulse.
With this method, the time period T1 from the reference time point to the time when the leading edge of the speed command pulse is detected is updated for each detection of the leading edge of the pulse, and the time period T2 from the reference time point to the time when the leading edge of the speed detection pulse is detected is updated for each detection of the leading edge of the pulse, to calculate the difference between T1 and T2 for each comparison timing. Accordingly, even when the phase difference between the speed command pulse and the speed detection pulse exceeds one period of the speed command pulse, the result of the calculation (T1-T2) becomes a value within one period.
The foregoing will be described more concretely with reference to FIG. 10. The phase of the speed detection pulse is, for example, delayed. At this time, in a case where a delay phase (phase difference) of the speed detection pulse relative to the speed command pulse is within one period of the speed command pulse (A or B in FIG. 10), the leading edge of a speed command pulse P1 (or P2) is detected and the leading edge of a speed detection pulse Q1 (or Q2) corresponding thereto is detected with a little delay. Accordingly, the phase difference A (or B) is calculated on the basis of the corresponding pulses P1 and Q1 (or pulses P2 and Q2) to be compared.
However, when the phase difference exceeds one period of the speed command pulse, the leading edge of, for example, a speed command pulse P3 is detected and the leading edge of a speed command pulse P4 subsequent to the speed command pulse P3 is detected before the leading edge of a speed detection pulse Q3 corresponding to the speed command pulse P3 is detected. In such a case, a phase difference D is calculated on the basis of not the corresponding pulses P3 and Q3 but the pulses P4 and Q3. Accordingly, there arises the situations where an actual phase difference C based on the corresponding pulses P3 and Q3 is not calculated.
Such situations prevent the rotational speed of the motor from being accurately controlled.